<%--

// Copyright 2009 sbva project
//
// This file is part of sbva,
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

--%>

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-nested" prefix="nested" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

<html:html lang="true">
   <head>
      <link href="<c:url value='/css/site.css'/>" rel="stylesheet" type="text/css">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title><bean:message key="welcome.title"/></title>
      <html:base/>
   </head>
   <body>

      <logic:notPresent name="org.apache.struts.action.MESSAGE" scope="application">
         <div  style="color: red">
            ERROR:  Application resources not loaded -- check servlet container
            logs for error messages.
         </div>
      </logic:notPresent>

      <div class="main-welcome"><bean:message key="welcome.heading"/></div>
      <div class="main-heading"><bean:message key="create.user"/></div>

      <nested:form action="/createUser">
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <nested:text property="person.firstName" styleClass="form-input"/>
               </div>
               <div class="col2">
                  <div class="errorMessage"><nested:errors property="person.firstName"/></div>
                  <bean:message key="create.user.name.first"/>
               </div>
            </div>
         </div>
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <nested:text property="person.middleName" styleClass="form-input"/>
               </div>
               <div class="col2">
                  <bean:message key="create.user.name.middle"/>
               </div>
            </div>
         </div>
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <nested:text property="person.lastName" styleClass="form-input"/>
               </div>
               <div class="col2">
                  <div class="errorMessage"><nested:errors property="person.lastName"/></div>
                  <bean:message key="create.user.name.last"/>
               </div>
            </div>
         </div>
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <nested:text property="person.ssn.area" maxlength="3" styleClass="ssn-area"/>
                  <nested:text property="person.ssn.group" maxlength="2" styleClass="ssn-group"/>
                  <nested:text property="person.ssn.serial" maxlength="4" styleClass="ssn-serial"/>
               </div>
               <div class="col2">
                  <div class="errorMessage"><nested:errors property="person.ssn.area"/></div>
                  <bean:message key="create.user.ssn"/>
               </div>
            </div>
         </div>
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <nested:text property="person.address.address0" styleClass="form-input"/>
               </div>
               <div class="col2">
                  <div class="errorMessage"><nested:errors property="person.address.address0"/></div>
                  <bean:message key="create.user.address.address"/>
               </div>
            </div>
         </div>
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <nested:text property="person.address.address1" styleClass="form-input"/>
               </div>
               <div class="col2">
               </div>
            </div>
         </div>
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <nested:text property="person.address.aptOrSuite" styleClass="form-input" style="width: 7em;"/>
               </div>
               <div class="col2">
                  <bean:message key="create.user.address.aptOrSuite"/>
               </div>
            </div>
         </div>
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <nested:text property="person.address.city" styleClass="form-input"/>
               </div>
               <div class="col2">
                  <div class="errorMessage"><nested:errors property="person.address.city"/></div>
                  <bean:message key="create.user.address.city"/>
               </div>
            </div>
         </div>
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <nested:text property="person.address.state" styleClass="form-input"/>
               </div>
               <div class="col2">
                  <div class="errorMessage"><nested:errors property="person.address.state"/></div>
                  <bean:message key="create.user.address.state"/>
               </div>
            </div>
         </div>
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <nested:text property="person.address.zip" styleClass="form-input"/>
               </div>
               <div class="col2">
                  <div class="errorMessage"><nested:errors property="person.address.zip"/></div>
                  <bean:message key="create.user.address.zip"/>
               </div>
            </div>
         </div>
         <div class="colmash leftmenu">
            <div class="colleft">
               <div class="col1">
                  <div class="button-submit"><nested:submit/></div>
               </div>
               <div class="col2">
               </div>
               <div class="col3">
               </div>
            </div>
         </div>
      </nested:form>

   </body>
</html:html>
